package com.example.elasticsearchdemo.model;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
 * @Author yanggld
 * @Date 2019/7/3-9:40
 * @Description
 * 诗词
 */
@Data
@Document(indexName="article",type="poetry")
public class Poetry {

	@Id
	private String id;

	private String title;

	@Field(type = FieldType.Text, analyzer = "ik_smart")
	private String content;

	private int sort;
}
